// 定义登录需要的接口函数
import request from '@/utils/request';

// 账户登录接口
export const userAccountLogin = ({ account, password }) => {
    return request('/login', 'post', { account, password })
}
// 手机号验证码登录
export const userMobileLoginMsg = (mobile) => {
    return request('/login/code', 'get', { mobile })
}
// 验证码登录
export const userMobileLogin = ({ mobile, code }) => {
    return request('/login/code', 'post', { mobile, code })
}
// qq登录
export const userQQLogin = (unionId, source = 6) => {
    return request('/login/social', 'post', { unionId, source })
}
// 获取QQ登录验证码
export const userQQBindCode = (mobile) => {
    return request('/login/social/code', 'get', { mobile })
}
// QQ绑定登录
export const userQQBindLogin = ({ unionId, mobile, code }) => {
    return request('/login/social/bind', 'post', { unionId, mobile, code })
}
// 校验用户名唯一性
export const userCheckAccount = (account) => {
    return request('/register/check', 'get', { account })
}
// 完善信息验证码
export const userQQPatchCode = (mobile) => {
    return request('/register/code', 'get', { mobile })
  }
// 完善信息登录
export const userQQPatchLogin = ({ unionId, mobile, code,account,password }) => {
    return request('/login/social/${unionId}/complement', 'post', { unionId, mobile, code,account,password })
}